package com.IntelligenceInsight.Myth;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.IntelligenceInsight.Myth.util.BuildSocket;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@MapperScan("com.IntelligenceInsight.Myth.mapper")
@SpringBootApplication
public class MythApplication extends SpringBootServletInitializer {
    // TODO: Prohibit BuildSocket in production environment, which is uesd to test RestAPI
    private static String APITestUrl = "localhost:9095";

    public static void main(String[] args) {
            SpringApplication.run(MythApplication.class, args);
//            BuildSocket.DoPost("http://" + APITestUrl + "/load.do", "");

    }

    @Override
    protected SpringApplicationBuilder configure(
            SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }
}
